/* The code is based on the following paper:                                                                                                            */
/*   Chen, T. Y., Lin, Y. L., and Tzeng, L. Y., forthcoming.                                                                                    */
/*   Estimating probability weighting functions through option pricing bounds. Review of Asset Pricing Studies. */
/*                                                                                                                                                                               */
/* Copyright: Tzu-Ying Chen, Yo-Lan Lin, Larry Y. Tzeng                                                                                    */
/* Date: January 30, 2024                                                                                                                                         */

libname OM 'E:\WRDS Data\���Y��\';

%MACRO RF (FileName); 
PROC PRINTTO log = "E:\WRDS Data\Record_RF.log";
RUN;

data rf;
set OM.&FileName;
run;

data rf;
set rf;
keep date days rate;
run;

data rf;
set rf; 
rate = rate / 100;
run;

PROC SORT DATA = rf OUT = rf NODUPKEY;
BY date days;
RUN; 

data _null_;                                         
set rf;                                        
file "E:\WRDS Data\RiskFreeRate19962021.txt";
put date days rate;
run;

%MEND RF;

%RF (ZeroCouponYield1996202302);
